package com.ls.fw.index.test;

import java.sql.Time;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.ls.fw.data.annotation.IndexField;
import com.ls.fw.data.annotation.IndexTable;

@IndexTable
public class Model1 {

	@IndexField(isPK=true)
	private Long id;
	@IndexField
	private String name;
	@IndexField(store=false)
	private String remark;
	
	@IndexField(isFK=true)
	private User1 user;
	
	@IndexField(fk="name",isFK=true)
	private User1 user1;
	
	@IndexField(store=false)
	private Date date = new Date();
	
	@IndexField(store=false)
	private Timestamp ts = new Timestamp(new Date().getTime());
	
	@IndexField(store=false)
	private Time t = new Time(new Date().getTime());
	
	@IndexField(store=false)
	private List list = new ArrayList();
	
	public Model1() {
		super();
		list.add("asdfa");
		list.add("asd阿斯达a");
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public void setUser(User1 user) {
		this.user = user;
	}
	public User1 getUser() {
		return user;
	}
	public List getList() {
		return list;
	}
	public void setList(List list) {
		this.list = list;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public Timestamp getTs() {
		return ts;
	}
	public void setTs(Timestamp ts) {
		this.ts = ts;
	}
	public Time getT() {
		return t;
	}
	public void setT(Time t) {
		this.t = t;
	}
	public User1 getUser1() {
		return user1;
	}
	public void setUser1(User1 user1) {
		this.user1 = user1;
	}
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Model1 [");
		if (id != null) {
			builder.append("id=");
			builder.append(id);
			builder.append(", ");
		}
		if (name != null) {
			builder.append("name=");
			builder.append(name);
			builder.append(", ");
		}
		if (remark != null) {
			builder.append("remark=");
			builder.append(remark);
			builder.append(", ");
		}
		if (user != null) {
			builder.append("user=");
			builder.append(user);
			builder.append(", ");
		}
		if (user1 != null) {
			builder.append("user1=");
			builder.append(user1);
			builder.append(", ");
		}
		if (date != null) {
			builder.append("date=");
			builder.append(date);
			builder.append(", ");
		}
		if (ts != null) {
			builder.append("ts=");
			builder.append(ts);
			builder.append(", ");
		}
		if (t != null) {
			builder.append("t=");
			builder.append(t);
			builder.append(", ");
		}
		if (list != null) {
			builder.append("list=");
			builder.append(list);
		}
		builder.append("]");
		return builder.toString();
	}
}
